
#include "os_task.h"
//**********************************************************

int os_task_create(void** handle,void* task_entry,void* arg)
{
    int ret = -1;

    #ifdef PT_LINUX
	ret=pthread_create((pthread_t*)handle,NULL,task_entry,arg);
	if(ret != 0){
		log_e("error=%s\n",strerror(ret));
        return OS_ERR;
	}
    #endif

    return OS_OK;
}

int os_task_destroy()
{
    #ifdef PT_LINUX


    #endif

    return 0;
}



int os_task_delayus(int us)
{
    #ifdef PT_LINUX
    usleep(us);
    #endif

    return 0;
}

int os_task_delayms(int ms)
{
    #ifdef PT_LINUX
    usleep(ms*1000);
    #endif
    return 0;
}